angular.module('fashionModule',['ionic'])
.controller("fashionCtrl",["$scope","fashions",function($s,fa){
	fa.fashion()
	.then(function(res){
		console.log(res.data.data.list[0].bannerList)
		$s.img = res.data.data
		$s.imgs = res.data.data.list[0].bannerList
	})
}])

.factory("fashions",function($http,$state){
	console.log($state.params.Id)
	var fashion = function(){
		return $http.get("/icy/m.php?method=media.getMedia&pageSize=20&page=1&isFromApp=NaN&isICYPage=false",{
			params:{
				mediaId:$state.params.Id
			}
		})
		.then(function(res){
			return res
		})
	};
	return {
		fashion:fashion
	}
})


